package demo.standard;

public class ConcretePrototype implements IPrototype {

    private String part1;
    private String part2;

    public String getPart1() {
        return part1;
    }

    public void setPart1(String part1) {
        this.part1 = part1;
    }

    public String getPart2() {
        return part2;
    }

    public void setPart2(String part2) {
        this.part2 = part2;
    }

    @Override
    public String toString() {
        return "Prototype{" +
                "part1='" + part1 + '\'' +
                ", part2='" + part2 + '\'' +
                '}';
    }

    @Override
    public IPrototype clone() {
        ConcretePrototype prototype = new ConcretePrototype();
        prototype.setPart1(this.getPart1());
        prototype.setPart2(this.getPart2());
        return prototype;
    }
}
